package com.samuel.bean;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @date:2017/11/21
 * @time: 14:40
 * @author:zhaoyang
 * @desc:配置类 @Configuration 表示 这个类是配置类
 *              @ComponentScan 表示 自动扫描 带有Spring 支持的注解的类
 **/



@Configuration
@ComponentScan("com.samuel.bean")
public class WayConfig {

    @Bean(initMethod = "init",destroyMethod = "destroy")
    BeanWayService beanWayService(){
        return new BeanWayService();
    }

    @Bean
    JSR250WayService jsr250WayService(){
        return new JSR250WayService();
    }
}
